package com.yh.homestay.controller;

import com.yh.homestay.aop.SystemLog;
import com.yh.homestay.common.HomeStayResult;
import com.yh.homestay.common.SysLogRustlt;
import com.yh.homestay.service.LogModelService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @ClassName LogController
 * @Description 日志Controller
 * @Date 2020/1/13 16:30
 */
@RestController
@Api(description = "司机管理")
@RequestMapping(value = "/log")
public class LogController {

    @Autowired
    private LogModelService logModelService;

    /**
     * @param page
     * @param limit
     * @param start
     * @param end
     * @param logAccessAccount
     * @Date: 2020/1/13 16:35
     * @Description: 获取所有日志列表
     * @return: com.yh.homestay.common.HomeStayResult
     */
    @RequestMapping(value = "/list",method = RequestMethod.GET)
    @SystemLog(methods = "日志展示", module = "日志管理")
    @ApiOperation(value = "获取所有日志列表", notes = "获取所有日志信息或者模糊查询")
    public HomeStayResult findAllLogs(Integer page, Integer limit, String start, String end, String logAccessAccount) {
        return logModelService.selecteAllLogs(page, limit, start, end, logAccessAccount);
    }


}
